Code
library(tidyverse)
library(googlesheets4)
library(skimr)
library(dplyr)
library(stringr)
library(lubridate)
library(janitor)
library(purrr)
library(corrr)
knitr::opts_chunk$set(echo = TRUE)Ananya Pujary
September 3, 2022
to do: if-else for package installing, in text citations
! Using an auto-discovered, cached token.
To suppress this message, modify your code or options to clearly consent to
the use of a cached token.
See gargle's "Non-interactive auth" vignette for more details:
<https://gargle.r-lib.org/articles/non-interactive-auth.html>
ℹ The googlesheets4 package is using a cached token for 'apujary@umass.edu'.
✔ Reading from "PoliticalAds".
✔ Range 'PoliticalAds'.
[1] 12705 38
| Name | polads_orig |
| Number of rows | 12705 |
| Number of columns | 38 |
| _______________________ | |
| Column type frequency: | |
| character | 28 |
| list | 1 |
| logical | 7 |
| numeric | 2 |
| ________________________ | |
| Group variables | None |
Variable type: character
| skim_variable | n_missing | complete_rate | min | max | empty | n_unique | whitespace |
|---|---|---|---|---|---|---|---|
| ADID | 0 | 1.00 | 64 | 64 | 0 | 12705 | 0 |
| CreativeUrl | 0 | 1.00 | 119 | 1319 | 0 | 6361 | 0 |
| Currency Code | 0 | 1.00 | 3 | 3 | 0 | 8 | 0 |
| StartDate | 0 | 1.00 | 20 | 20 | 0 | 2621 | 0 |
| EndDate | 1682 | 0.87 | 20 | 20 | 0 | 1259 | 0 |
| OrganizationName | 0 | 1.00 | 3 | 61 | 0 | 532 | 0 |
| BillingAddress | 0 | 1.00 | 2 | 96 | 0 | 318 | 0 |
| CandidateBallotInformation | 6308 | 0.50 | 2 | 48 | 0 | 565 | 0 |
| PayingAdvertiserName | 0 | 1.00 | 2 | 32 | 0 | 786 | 0 |
| Gender | 11344 | 0.11 | 4 | 6 | 0 | 2 | 0 |
| AgeBracket | 610 | 0.95 | 3 | 5 | 0 | 133 | 0 |
| CountryCode | 87 | 0.99 | 5 | 20 | 0 | 27 | 0 |
| Regions (Included) | 6894 | 0.46 | 4 | 492 | 0 | 223 | 0 |
| Regions (Excluded) | 12343 | 0.03 | 4 | 482 | 0 | 46 | 0 |
| Electoral Districts (Included) | 12437 | 0.02 | 18 | 230 | 0 | 37 | 0 |
| Radius Targeting (Included) | 11843 | 0.07 | 40 | 24658 | 0 | 422 | 0 |
| Radius Targeting (Excluded) | 12695 | 0.00 | 46 | 5920 | 0 | 2 | 0 |
| Metros (Included) | 12218 | 0.04 | 4 | 1515 | 0 | 87 | 0 |
| Metros (Excluded) | 12671 | 0.00 | 7 | 53 | 0 | 3 | 0 |
| Postal Codes (Excluded) | 12607 | 0.01 | 15 | 1253 | 0 | 12 | 0 |
| Interests | 10544 | 0.17 | 6 | 1486 | 0 | 355 | 0 |
| OsType | 12550 | 0.01 | 3 | 7 | 0 | 2 | 0 |
| Segments | 6433 | 0.49 | 22 | 22 | 0 | 1 | 0 |
| Language | 10069 | 0.21 | 2 | 59 | 0 | 28 | 0 |
| AdvancedDemographics | 11922 | 0.06 | 4 | 539 | 0 | 76 | 0 |
| Targeting Connection Type | 12637 | 0.01 | 4 | 4 | 0 | 2 | 0 |
| Targeting Carrier (ISP) | 12699 | 0.00 | 128 | 128 | 0 | 3 | 0 |
| CreativeProperties | 1997 | 0.84 | 30 | 546 | 0 | 5251 | 0 |
Variable type: list
| skim_variable | n_missing | complete_rate | n_unique | min_length | max_length |
|---|---|---|---|---|---|
| Postal Codes (Included) | 0 | 1 | 323 | 0 | 1 |
Variable type: logical
| skim_variable | n_missing | complete_rate | mean | count |
|---|---|---|---|---|
| CommitteeName | 12705 | 0 | NaN | : |
| CommitteeIdentificationNumber | 12705 | 0 | NaN | : |
| DisclosureNameOfCommittee | 12705 | 0 | NaN | : |
| AdvertisingJurisdiction | 12705 | 0 | NaN | : |
| Electoral Districts (Excluded) | 12705 | 0 | NaN | : |
| Location Categories (Included) | 12705 | 0 | NaN | : |
| Location Categories (Excluded) | 12705 | 0 | NaN | : |
Variable type: numeric
| skim_variable | n_missing | complete_rate | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
|---|---|---|---|---|---|---|---|---|---|---|
| Spend | 0 | 1 | 1789.43 | 6583.85 | 0 | 62 | 266 | 1083 | 204062 | ▇▁▁▁▁ |
| Impressions | 0 | 1 | 491055.16 | 2709667.72 | 1 | 13691 | 59810 | 242499 | 149100063 | ▇▁▁▁▁ |
| Variable | Stats / Values | Freqs (% of Valid) | Graph | Missing | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ADID [character] |
|
|
0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CreativeUrl [character] |
|
|
0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Currency Code [character] |
|
|
0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Spend [numeric] |
|
3494 distinct values | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Impressions [numeric] |
|
12144 distinct values | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| StartDate [character] |
|
|
0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EndDate [character] |
|
|
1682 (13.2%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OrganizationName [character] |
|
|
0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BillingAddress [character] |
|
|
0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CandidateBallotInformation [character] |
|
|
6308 (49.6%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PayingAdvertiserName [character] |
|
|
0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CommitteeName [logical] |
|
12705 (100.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CommitteeIdentificationNumber [logical] |
|
12705 (100.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DisclosureNameOfCommittee [logical] |
|
12705 (100.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AdvertisingJurisdiction [logical] |
|
12705 (100.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Gender [character] |
|
|
11344 (89.3%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AgeBracket [character] |
|
|
610 (4.8%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CountryCode [character] |
|
|
87 (0.7%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Regions (Included) [character] |
|
|
6894 (54.3%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Regions (Excluded) [character] |
|
|
12343 (97.2%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Electoral Districts (Included) [character] |
|
|
12437 (97.9%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Electoral Districts (Excluded) [logical] |
|
12705 (100.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Radius Targeting (Included) [character] |
|
|
11843 (93.2%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Radius Targeting (Excluded) [character] |
|
|
12695 (99.9%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Metros (Included) [character] |
|
|
12218 (96.2%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Metros (Excluded) [character] |
|
|
12671 (99.7%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Postal Codes (Included) [list] |
|
|
0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Postal Codes (Excluded) [character] |
|
|
12607 (99.2%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Location Categories (Included) [logical] |
|
12705 (100.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Location Categories (Excluded) [logical] |
|
12705 (100.0%) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interests [character] |
|
|
10544 (83.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OsType [character] |
|
|
12550 (98.8%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Segments [character] | 1. Provided by Advertiser |
|
6433 (50.6%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Language [character] |
|
|
10069 (79.3%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AdvancedDemographics [character] |
|
|
11922 (93.8%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Targeting Connection Type [character] |
|
|
12637 (99.5%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Targeting Carrier (ISP) [character] |
|
|
12699 (100.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CreativeProperties [character] |
|
|
1997 (15.7%) |
Generated by summarytools 1.0.1 (R version 4.2.1)
2022-09-03
This file contains the information for political ads that are/have been displayed on Snapchat’s platform. It has 12705 rows and 38 columns. There are 28 character-type, 1 list-type, 7 logical-type, and 2 numeric-type columns. the variables are:
ADID: A unique value for each political advertisement.
CreativeURL: A URL to the advertisement’s creative content.
Currency Code: The currency used by the account creating the advertisement.
Spend: The amount spent by the advertiser for the ad campaign expressed in local currency.
Impressions: The number of times the advertisement has been viewed by Snapchat users.
StartDate: The time at which the advertisement was set to start running on the platform.
EndDate: The time at which the advertisement was set to stop running on the platform.
OrganizationName: The organization that is responsible for creating the advertisement.
BillingAddress: The address of the organization that is responsible for creating the advertisement.
CandidateBallotInformation: Information on the candidate (for California elections: also the office they are contesting for) or ballot initiative that the advertisement is associated with the advertisement.
PayingAdvertiserName: The entity that is providing funds for the advertisement.
CommitteeName: The name of the committee paying for the advertisement.
CommitteeIdentificationNumber: The identification number of the committee paying for the advertisement.
DisclosureNameOfCommittee: The disclosure name of the committee paying for the advertisement, as stipulated by California law.
AdvertisingJurisdiction: The jurisdiction that the advertisement refers to.
Gender: The genders targeted by the advertisement. If this field is empty, all genders were targeted.
AgeBracket: The ages targeted by the advertisement. If this field is empty, all ages were targeted.
CountryCode: The country that the advertisement is targeting.
Regions (Included): The region(s) included in the advertisement’s targeting criteria (states or provinces).
Regions (Excluded): The region(s) excluded in the advertisement’s targeting criteria (states or provinces).
Electoral Districts (Included): The electoral district(s) included in the advertisement’s targeting criteria.
Electoral Districts (Excluded): The electoral district(s) excluded in the advertisement’s targeting criteria.
Radius Targeting (Included): The point-radius circles included in the advertisement’s targeting criteria.
Radius Targeting (Excluded): The point-radius circles excluded in the advertisement’s targeting criteria.
Metros (Included): The metro(s) included in the advertisement’s targeting criteria.
Metros (Excluded): The metro(s) excluded in the advertisement’s targeting criteria.
Postal Code (Included): The postal code(s) included in the advertisement’s targeting criteria.
Postal Code (Excluded): The postal code(s) excluded in the advertisement’s targeting criteria.
Location Categories (Included): The location categories included in the advertisement’s targeting criteria.
Location Categories (Excluded): The location categories excluded in the advertisement’s targeting criteria.
Interests: The interest audience(s) included in the advertisement’s targeting criteria. If this field is empty, then no interest targeting was used.
OsType: The operating systems included in the advertisement’s targeting criteria. If this field is empty, then all operating systems were targeted.
Segments: The segments included in the advertisement’s targeting criteria. This is advertiser-specific data used such as Snap Audience Match1 or Lookalike audiences2 .
Language: The languages targeted by the advertisement. If this field is empty, then no language-based targeting was used.
AdvancedDemographics: The third-party data segments targeted by the advertisement. If this field is empty, then no third-party data segments were used.
Targeting Connection Type: The internet connection type targeted by the advertisement. If this field is empty, then no targeting based on internet connect type was used.
Targeting Carrier (ISP): The carrier type targeted by the advertisement. If this field is empty, all carrier types are targeted.
CreativeProperties: The URL specified in advertisement’s call to action.
issue: all columns not showing up in plot
`summarise()` has grouped output by 'key', 'total'. You can override using the
`.groups` argument.
levels <-
(missing.values %>% filter(isna == T) %>% arrange(desc(percents)))$key
missing_val_plot <- missing.values %>%
ggplot() +
geom_bar(aes(x = reorder(key, desc(percents)),
y = percents, fill=isna),
stat = 'identity', alpha=0.8) +
scale_x_discrete(limits = levels) +
scale_fill_manual(name = "",
values = c('pink', 'grey'), labels = c("Present", "Missing")) +
coord_flip() + labs(title = "Percentage of missing values", x =
'Column', y = "Missing values %")
missing_val_plotWarning: Removed 10 rows containing missing values (position_stack).

Now, let’s look at the distribution of countries receiving political advertisements on Snapchat.
arrange in descending
| Country | Frequency |
|---|---|
| australia | 62 |
| austria | 2 |
| belgium | 1 |
| brazil | 4 |
| canada | 220 |
| denmark | 25 |
| finland | 4 |
| france | 25 |
| germany | 39 |
| indonesia | 3 |
| ireland | 123 |
| japan | 4 |
| jordan | 3 |
| kuwait | 489 |
| netherlands | 15 |
| new zealand | 60 |
| nigeria | 3 |
| norway | 144 |
| philippines | 3 |
| poland | 1 |
| saudi arabia | 4 |
| south africa | 2 |
| sweden | 69 |
| switzerland | 13 |
| united arab emirates | 1 |
| united kingdom | 175 |
| united states | 11124 |
The highest number of political advertisements were delivered to places in the United States (11124).
Snake case is typically recommended by tidyverse’s style guide for column names and object names. However the column names in this dataset are written either in title case (e.g. Currency Code) or camel case (e.g. OrganizationName). Some of them also contain special characters like brackets which could interfere with implementing R functions.
Snake case refers to the writing style that replaces spaces between words with an underscore (_) and all of the letters in a word are lowercase. On the other hand, title case is the writing style in which the first letter of each word is capitalized and there are spaces between each word. A third type is the camel case, wherein phrases are written out without punctuation or spaces, and words are usually distinguished with the second word’s first letter capitalized.
Hence, using the clean_names() function from the ‘janitor’ package to convert all the column names accordingly.
[1] "adid" "creative_url"
[3] "currency_code" "spend"
[5] "impressions" "start_date"
[7] "end_date" "organization_name"
[9] "billing_address" "candidate_ballot_information"
[11] "paying_advertiser_name" "committee_name"
[13] "committee_identification_number" "disclosure_name_of_committee"
[15] "advertising_jurisdiction" "gender"
[17] "age_bracket" "country_code"
[19] "regions_included" "regions_excluded"
[21] "electoral_districts_included" "electoral_districts_excluded"
[23] "radius_targeting_included" "radius_targeting_excluded"
[25] "metros_included" "metros_excluded"
[27] "postal_codes_included" "postal_codes_excluded"
[29] "location_categories_included" "location_categories_excluded"
[31] "interests" "os_type"
[33] "segments" "language"
[35] "advanced_demographics" "targeting_connection_type"
[37] "targeting_carrier_isp" "creative_properties"
Since these columns only have missing values, they can be excluded from analysis: committee_name, committee_identification_number, disclosure_name_of_committee, advertising_jurisdiction, electoral_districts_excluded, location_categories_included, location_categories_excluded.
value for "which" not specified, defaulting to c("rows", "cols")
Only keeping rows that describe ads targeting the United States:
# A tibble: 11,124 × 31
adid creat…¹ curre…² spend impre…³ start…⁴ end_d…⁵ organ…⁶ billi…⁷ candi…⁸
<chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
1 e78d27… https:… USD 320 17437 2020/0… 2020/0… Realti… P.O. B… Donald…
2 216082… https:… USD 1 88 2020/1… 2020/1… Hawkfi… 909 Th… Collec…
3 a9477e… https:… USD 194 31396 2020/1… 2020/1… Wavele… US Nation…
4 c7865f… https:… USD 10 2244 2020/0… 2020/1… Chong … 1707 L… <NA>
5 a3bc3a… https:… USD 154 40016 2020/0… 2020/0… BCom S… 919 Ce… <NA>
6 bf710f… https:… USD 471 52925 2020/0… 2020/0… ACRONYM US <NA>
7 0a1f53… https:… USD 220 26468 2020/0… 2020/0… ACRONYM US <NA>
8 b12e6e… https:… USD 97 111865 2020/0… <NA> Greate… US <NA>
9 d9974b… https:… USD 36 8699 2020/0… 2020/0… LoudDo… 1 MONC… <NA>
10 511f74… https:… USD 560 281284 2020/0… 2020/0… Pete f… 202 S … Pete f…
# … with 11,114 more rows, 21 more variables: paying_advertiser_name <chr>,
# gender <chr>, age_bracket <chr>, country_code <chr>,
# regions_included <chr>, regions_excluded <chr>,
# electoral_districts_included <chr>, radius_targeting_included <chr>,
# radius_targeting_excluded <chr>, metros_included <chr>,
# metros_excluded <chr>, postal_codes_included <list>,
# postal_codes_excluded <chr>, interests <chr>, os_type <chr>, …
# ℹ Use `print(n = ...)` to see more rows, and `colnames()` to see all variable names
Verifying whether all ads targeted for the United States were paid for in USD.
Three ads were paid for in Canadian Dollars (CAD). Finding out more about these three rows:
# A tibble: 3 × 31
adid creat…¹ curre…² spend impre…³ start…⁴ end_d…⁵ organ…⁶ billi…⁷ candi…⁸
<chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
1 ad3ebd9… https:… CAD 3320 1121298 2020/0… 2020/0… MediaC… 155 Qu… <NA>
2 2df33db… https:… CAD 1647 608480 2020/0… 2020/0… MediaC… 155 Qu… <NA>
3 ec74eec… https:… CAD 106 42658 2020/1… <NA> Point … 1404-2… <NA>
# … with 21 more variables: paying_advertiser_name <chr>, gender <chr>,
# age_bracket <chr>, country_code <chr>, regions_included <chr>,
# regions_excluded <chr>, electoral_districts_included <chr>,
# radius_targeting_included <chr>, radius_targeting_excluded <chr>,
# metros_included <chr>, metros_excluded <chr>, postal_codes_included <list>,
# postal_codes_excluded <chr>, interests <chr>, os_type <chr>,
# segments <chr>, language <chr>, advanced_demographics <chr>, …
# ℹ Use `colnames()` to see all variable names
Two ads were paid for by the University of British Columbia and were targeted at people aged 16-25 in the following areas: San Francisco, Oakland, and San Jose. The third was paid for by Point Digital Creative Studio. None of them provided information about the candidate associated with the ad.
Since we require information about the candidate in order to analyze relative ad spending, targetting and impressions, tidying up the candidate_ballot_information column by removing missing values:
[1] 5312
# A tibble: 5,812 × 31
adid creat…¹ curre…² spend impre…³ start…⁴ end_d…⁵ organ…⁶ billi…⁷ candi…⁸
<chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
1 e78d27… https:… USD 320 17437 2020/0… 2020/0… Realti… P.O. B… Donald…
2 216082… https:… USD 1 88 2020/1… 2020/1… Hawkfi… 909 Th… Collec…
3 a9477e… https:… USD 194 31396 2020/1… 2020/1… Wavele… US Nation…
4 511f74… https:… USD 560 281284 2020/0… 2020/0… Pete f… 202 S … Pete f…
5 622f25… https:… USD 453 87659 2020/0… 2020/1… Bluepr… 1730 R… Angie …
6 0218a5… https:… USD 12188 793089 2020/1… 2020/1… GMMB, … 3050 K… Biden …
7 3c4466… https:… USD 29 6634 2020/1… 2020/1… Break … 1768 C… Fire M…
8 29b33d… https:… USD 783 77524 2020/0… 2020/0… Biden … 1500 M… Biden …
9 81be40… https:… USD 52 26369 2020/0… 2020/0… Future… US Earth …
10 8846e4… https:… USD 387 30969 2020/1… 2020/1… Bully … 1445 N… Joe Bi…
# … with 5,802 more rows, 21 more variables: paying_advertiser_name <chr>,
# gender <chr>, age_bracket <chr>, country_code <chr>,
# regions_included <chr>, regions_excluded <chr>,
# electoral_districts_included <chr>, radius_targeting_included <chr>,
# radius_targeting_excluded <chr>, metros_included <chr>,
# metros_excluded <chr>, postal_codes_included <list>,
# postal_codes_excluded <chr>, interests <chr>, os_type <chr>, …
# ℹ Use `print(n = ...)` to see more rows, and `colnames()` to see all variable names
There were 5312 rows missing candidate information. Next, I’m only including those rows that explicitly states the candidate name (containing the words ‘Biden’ and ‘Trump’).
candidate_ballot_information
2020
1
2020 Census
14
2020 Election
9
2020 GA Runoff
4
2020 General Election Act GOTV
1
2020 General Election New Mexico
3
2020 General Elections
1
2020 General Elections Absentee NM
1
2020 General Elections NM
1
2020 General GOTV Ed NM
1
2020 Get Out the Vote
1
2020 Presidential Election
1
2020 US Census
14
314 Action
17
A Better Wisconsin Together
1
A Better Wisconsin Together Political Fund
3
Aaron Godfrey
1
Aaron Godfrey for Congress
1
Aaron Lieberman
2
Abigail Wheeler
3
ACCESS
4
Against Trump
1
AJ Kurdoglu
7
Al Gross
2
Alameda County Community Food Bank
6
Alek Skarlatos
1
Alexandria Ocasio-Cortez
6
Alexandria Ocasio-Cortez for Congress
8
Alyse Galvin
4
Amanda Siggins
2
America First Action
6
America First Policies
12
Amy McGrath for Senate
95
Andrea Hickey for Village President
1
Andrew Yang
1
Angie Craig for Congress
10
Anthony Brindisi
7
Arizonans for Second Chances
1
Asian Pacific Islander American Vote
5
Austin Knudsen
1
AZ Students Association
52
BadgersVote
1
Be a Voter videos
1
Beaver Dam Public Safety Referendum
2
Ben Schwanke
2
Betty Guardado
1
Biden
5
Biden for President
676
Biden Harris
2
Biden Victory Fund
65
Biden vs Trump
1
Bill Bolton for Senate
3
Black Lives Matter
1
Black Lives Matter Michigan
1
Black Vote PA
2
Blood Weber Bostar Hester
34
Bluestem Kansas
1
Brenda McKenna for SD9
3
Brian Chism for 27th State Representative
3
Brian Evans for US Congress District 2
1
Bridget Mary McCormack and Elizabeth Welch
1
CA 48 House Race
3
CA-25 GOTV
13
California National Party
1
California Secretary of State
72
Cameron County Votes
1
Cameron Webb for Congress
2
Cameron Webb for Congress VA5
1
Candace Valenzuela
4
Cathy Kunkel
1
Ch 78
1
Chance Trahan
1
Chokwe Pitchford
2
Christina Hale
7
Christine Marsh
5
Chuck Clemons for State Representative
1
Citizen Action Wisconsin
18
Claire Barnett
1
Colette Nies
2
Collective Future
1
Collective PAC
335
Committee To Elect Holly Herson
1
CommitteeToElectHollyHerson
2
Commonwealth Commucations
6
Commonwealth Communications
6
Congress of Counties
2
Conozca su voto
1
Coral Evans
6
Corey Woods for Mayor of Tempe
1
Corrupto Carlos Gimenez
2
Count Every Vote
11
Dan Feehan
16
Dan Forest for Governor
2
Dan Quart
3
Danny Ellyson
1
Danny Ellyson For United States Congress
1
Danny Hamrick
2
Daqavise Winston
2
Dave Koehler for IL State Senate
2
Dave Koehler for Senate
3
David Dudenhoefer for Congress
1
David Young
1
Day and Royers
24
DCCC
5
Deborah Gonzalez for District Attorney
1
Defend American Democracy
1
Delia Parker Mims
16
Democratic National Committee
276
Democratic National Convention Committee
14
Democrats and Joe Biden
1
Desiree Tims
1
Detroit Action
1
Detroit Branch NAACP
5
Detroit Hispanic Development Council
5
DNC
31
DNCC
23
Donal Trump
1
Donald Abbott
1
Donald For Sparks
3
Donald J Trump
12
Donald J Trump for President
312
Donald Trump
66
Donald Trunp
1
Doreen Gallegos for NM HD52
2
Doria Drost
1
Early Voting - Presidential Primary
1
Earth Day 2020
9
Earth Day Live 2020
12
Education Now
32
El Sheriff Troy Nehls no respeta Texas
4
Elad Gross
3
Election 2020
120
Election Day
3
Eliot Bostar
1
Eliot Engel
1
Emmanuel Zamora
4
Engage Michigan
2
Engage Michigan ACLU
2
Equality PAC
6
Eric Garza
5
Ernest E Mackins
2
Face the Facts Election 2020 Youth Town Hall
1
Fair Fight
2
Felicia French
2
Fire Mitch Save America Fund
27
Fiscal Guide to Voting
18
Florida Democratic Party
26
Florida Watch
27
For Wisconsin 49th District Assembly
1
Franklin Cornielle
2
Franklin Cornielle for MI State Rep
2
Free the vote Nicole ad
2
Friends for Foxx
6
Future Coalition
2
FYI
1
GA Runoff
1
GARY DICKENS
1
Gary Peters
1
Gay Pride
1
General Neighbors
1
Georgia Budget and Policy Institute
30
Georgia Runoff
40
Georgia Runoff Election Register to Vote
1
Georgia Senate Runoff Election
6
Georgia Senate Runoffs
1
Georgia United Victory
1
Get Out the Vote
33
Get Out The Vote
1
Get Your Friends Registered To Vote
8
GOOD PARTY
13
GOTV
46
Governor Eric Holcomb
1
Healthy Voting
33
Heath Howard
1
Helen Probst Mills
2
Holland Jones
2
Holland Jones 4 Sheriff
1
Holly Herson for HD 48
1
IE Supporting Joe Biden for President
4
IE Supporting Senator Gary Peters
2
IE Supporting VP Joe Biden for President
2
Immigration
1
INVESTinED
64
Iowa Democratic Party
2
iVote Civic Engagement Fund
1
Jacqueline Smith for MCCCD
1
Jason Crow for Congress
3
Jason Windham
1
Jeff Leach
1
Jene Huffman Gilreath
1
Jerry Nadler
1
Jessica Velasquez for NM House
1
Jill Schupp for Congress
9
Joe Biden
473
Joe Biden and Kamala Harris
9
Joe Biden for President
11
Joe Biden Mark Kelly
3
JOE COLLINS FOR CONGRESS
2
John Check
6
John Hickenlooper
4
John James
8
Jon Ossoff
2
Judge Jennifer Brunner and Judge John P ODonnell
3
Just Vote
40
Kalamazoo County Housing Proposal
2
Kanye West
7
Karen Whitlock
2
Kate Bolz
1
Kate Schroder
3
Katie M Blakeman Champaign County Circuit Clerk
1
Katie Porter
13
Katie Stuart
2
Kelda Roys
2
Kelly Kautz
1
Kim Mangone
1
Kimberly Bizon for US Congress
1
Kyle Boyer for PA Senate District 19
1
Kyle Boyer for State Senate District 19
1
Kyle J Boyer
1
Kyle J Boyer for PA Senate
1
Kyle J Boyer for PA Senate District 19
1
Kyle J Boyer for State Senate
4
Lauren Underwood
6
LCV Victory Fund
37
Leaders We Can Trust
1
Leadership MKE
3
League of Women Voters Fairfax
1
Let America Vote
6
Let America Vote and NDRC
22
Linda Thor
2
Lindsey Travis
1
Lindsey Travis -- Democrat for Wyoming HD 60
1
Liz Stefanics for NM SD39
3
Lynne King Smith
1
Macomb County MI County Prosecutor IE
2
Madeline Eden
2
Mail in Voting
2
Majority Forward
1
Make sure you get out and vote
1
March For Our Lives GOTV
9
Mark Bussman
1
Mark Kelly
1
Mark Kelly for Senate
26
Martin Lemelle
1
Maryland Votes 2020
2
Mas Caro Menos Cobertura
4
Matt Clark for Kansas House District 23
1
Matt Lieberman for Senate
3
Matt Rosendale for Montana
2
Matthew Clark for Kansas State Representative 23
1
Melanie Stansbury for NM HD28
2
Michigan 2020 Census
4
Michigan Congressional Candidates
3
Michigan State Legislative Candidates
10
Michigan Supreme Court
5
Michigan Voting
5
Mike Bloomberg 2020 Inc
59
Minnesota Department of Health
13
Missi Tunnell Gilbert
1
Mission Hospital Union Election
4
Moe Davis
8
Moe Davis for Congress
4
Mokah for Georgia
1
Mondaire Jones
10
Monroe County DEC
1
Montanans for Bullock
7
Move Health Care Forward NJ
15
MSEA - SEIU Local 1989
15
NA
3
Natalie Broussard
1
National Popular Vote Interstate Compact
1
National Redistricting Foundation
36
National Register to Vote Day
2
National Register To Vote Day
4
NC Team Democracy
1
ND Behavioral Health Division
6
Nevada State Democratic Party
1
New Approach Montana
4
Nicole Breadon
6
Nicole Galloway
4
NJEA
12
No on 1
2
No Prop 207
1
Non Partisan Voter Registration
1
Nonpartisan
2
November 7th Election
4
NRDC Action Votes
3
NV General
3
Operation Dump Trump
2
Organizing Corps 2020
3
PACT Coalition
1
Paid for by Spring for Council 2020
1
Pasha Baker
4
Pat Timmons Goodson
2
Patients for Affordable Drugs
28
Patricia Timmons Goodson for Congress
11
Paula Prentice
1
Pete for America
70
Peter Cruz
2
Poder Latinx
1
Police Reform in Maryland
1
Poll Official
1
Poor Peoples Campaign
2
President Donald Trump
27
President Trump
59
PRESIDENT TRUMP
23
Presidential Election
4
Presidential Poll
4
PrezzyFlipFlops
5
Prochoice Democrats
2
Progress Florida Education Institute
11
Progress Michigan Political Action Fund
1
Progress NC
5
Progress North Carolina
161
Progress Virginia
2
Proposition R
9
Protect NC Water
3
Protect The Promise
1
PSA of musicians encouraging users to vote
3
Raphael Warnock
6
Raphael Warnock and Jon Ossoff
4
Rashida Tlaib for Congress
3
Real Facts NC
21
Reelect Paula Prentice
1
Register to Vote
8
Register To Vote
1
Register to Vote 2020
1
Register to Vote in 2020
2
Reproductive Rights
1
Republican National Committee
16
Republican Retail Store
1
Reverend Raphael Warnock
3
RideShare2Vote
2
Ritchie Torres
1
Rob Ochoa
1
Robert Peters
1
Rock the Vote
2
Rocky Mountain Values
1
Ryan Berman
5
Ryan For Arizona
1
Ryan Kauffman For Circuit Clerk
2
Ryan Kauffman For Kendall County Circuit Clerk
1
Ryan Starzyk
2
Ryan Starzyk State Senate Candidate
2
Sam Hatton
1
Sanford Bishop
3
Sara Gideon
19
Sara Jacobs
9
Schiff for Congress
4
Science Moms
1
Second Stimulus
2
Senator Mark Warner
4
Shawn Hingson For Suwanee County Sheriff
1
Shawn Hingson For Suwannee County Sheriff
10
Shelley Luther for Texas
4
Show Up To Vote
137
Signup to Vote by Mail
3
Sisters in Service
2
Smart and Safe Arizona
8
Social Sustainability
1
Spanish Neighbors
1
Spiros Mantzavinos for State Senate
1
Spring Break
6
Sprite Coca Cola Create Your Future
2
Squad Victory Fund
3
Stephanie Phillips
1
Steve Bullock for Senate
6
STEVE DAINES FOR MONTANA
2
Sue Finney 4 MN House
1
Sunrise Movement
2
Supermajority
250
Supermajority PAC
6
Support HEROES Act
10
Suraj Patel
1
Susan Collins for Senator
1
Susie Lee for Congress
13
T Dan Baker
1
Take Back Colorado
3
Team Graham
9
Ted Cruz
2
The IMPACT Fund
15
Theresa Greenfield
12
They Voted Will You
1
Titere de Trump
3
Todd Hunter- State Rep 32nd Dist
1
Tony Sumnicht for Crystal City Council Ward 3
1
Trump
4
Trump 2020
2
Tulsa Voter Van
2
Turning Point USA
1
Turnout Activism Inc
11
United States Conference of Catholic Bishops
13
USG President
2
Valerie Plame for Congress
1
Vota Hoy
1
Vote
4
Vote 2020
76
VOTE BLUE
2
Vote By Mail
220
Vote Early
4
Vote Early Video
1
Vote Like A Madre
2
Vote Like a Woman
14
Vote With Us
1
Vote Yes
2
Vote Yes For Fairness
7
Vote Your Way
2
Vote411
2
Votemos por Smith
2
Voter Guide
1
Voter Registration
37
Voter Registration and Education
3
VoteWithUs
1
Voting Rights Protections
15
Voto Latino
27
Warnock for Georgia
1
Warren for President
9
We Go Together
2
We need you to get out and vote
1
Wear a Mask Fight Covid19
1
When We All Vote
4
Wisconsin Conservation Voters
17
Women Vote
60
Women Vote CO3
8
Working Families Party IE
2
Yes On 2 MA Ranked Choice Voting 2020 Committee
16
YES on 2C and 2D
1
Youth Vote Matters
3
Youth Voters
1
| candidate_ballot_information | Freq |
|---|---|
| Against Trump | 1 |
| Biden | 5 |
| Biden for President | 676 |
| Biden Harris | 2 |
| Biden Victory Fund | 65 |
| Biden vs Trump | 1 |
| Democrats and Joe Biden | 1 |
| Donal Trump | 1 |
| Donald J Trump | 12 |
| Donald J Trump for President | 312 |
| Donald Trump | 66 |
| IE Supporting Joe Biden for President | 4 |
| IE Supporting VP Joe Biden for President | 2 |
| Joe Biden | 473 |
| Joe Biden and Kamala Harris | 9 |
| Joe Biden for President | 11 |
| Joe Biden Mark Kelly | 3 |
| Operation Dump Trump | 2 |
| President Donald Trump | 27 |
| President Trump | 59 |
| Titere de Trump | 3 |
| Trump | 4 |
| Trump 2020 | 2 |
There are two entries that contain the string “Trump” but are in fact campaigning against him (“Against Trump”, “Operation Dump Trump”, “Titere de Trump”). There’s also an entry called “Biden vs Trump” which doesn’t clearly indicate which party the ad will be supporting. Removing these rows so that they don’t skew the results:
(aside: 7 ads for Kanye West!)
Since missing values in certain columns indicate that either all or none of the categories in the column were targeted, I’m changing their missing values accordingly for easy analysis.
gender
FEMALE MALE
3 84
os_type
ANDROID IOS
2 4
language
en en,es en,es,ar es
113 7 1 25
advanced_demographics
College Graduates
1
HHI: High Net Worth,HHI: 100-250k,HHI: 250k+
2
Moms
2
New Moms,Married People,New Parents,Parents,Small Business Employees,Spanish Speakers,Household Income ($1,000-$24,999),Household Income ($25,000-$49,999),Household Income ($50,000-$74,999),Life Event (First Time Homebuyer),Life Event (New Homeowner, 12 months),Presence of Child (Age: 0-3),Presence of Child (Age: 10-12),Occupation (Retired),Moms (Working),Moms (Single),Education (Bachelor Degree),Education (High School Diploma),Education (Some High School),Moms (2+ children)
1
New Moms,New Parents,Married People,Parents,HHI: <50k,Small Business Decisionmakers,Household Income ($50,000-$74,999),Household Income ($1,000-$24,999),Household Income ($25,000-$49,999),Life Event (First Time Homebuyer),Life Event (New Homeowner, 12 months),Presence of Child (Age: 0-3),Presence of Child (Age: 10-12),Occupation (Office & Administrative),Moms (Working),Occupation (Retired),Moms (Stay at Home),Moms (Single),Spanish Speakers,Education (Bachelor Degree),Education (Some High School),Moms (2+ children)
2
New Moms,Parents,Small Business Decisionmakers,Small Business Employees,Education (High School Diploma),Education (Bachelor Degree),Education (Some College),Household Income ($1,000-$24,999),Household Income ($25,000-$49,999),Household Income ($50,000-$74,999),Life Event (First Time Homebuyer),Life Event (New Homeowner, 12 months),Moms (Single),New Parents,Moms (Working),Spanish Speakers,Education (Some High School),Life Event (Recently Single, 6 months),Occupation (Retired),Presence of Child (Age: 0-3),Presence of Child (Age: 10-12)
1
Occupation (Blue Collar)
2
Spanish Speakers
7
< table of extent 0 >
< table of extent 0 >
gender
ALL FEMALE MALE
1647 3 84
os_type
ALL ANDROID IOS
1728 2 4
language
en en,es en,es,ar es none
113 7 1 25 1588
advanced_demographics
College Graduates
1
HHI: High Net Worth,HHI: 100-250k,HHI: 250k+
2
Moms
2
New Moms,Married People,New Parents,Parents,Small Business Employees,Spanish Speakers,Household Income ($1,000-$24,999),Household Income ($25,000-$49,999),Household Income ($50,000-$74,999),Life Event (First Time Homebuyer),Life Event (New Homeowner, 12 months),Presence of Child (Age: 0-3),Presence of Child (Age: 10-12),Occupation (Retired),Moms (Working),Moms (Single),Education (Bachelor Degree),Education (High School Diploma),Education (Some High School),Moms (2+ children)
1
New Moms,New Parents,Married People,Parents,HHI: <50k,Small Business Decisionmakers,Household Income ($50,000-$74,999),Household Income ($1,000-$24,999),Household Income ($25,000-$49,999),Life Event (First Time Homebuyer),Life Event (New Homeowner, 12 months),Presence of Child (Age: 0-3),Presence of Child (Age: 10-12),Occupation (Office & Administrative),Moms (Working),Occupation (Retired),Moms (Stay at Home),Moms (Single),Spanish Speakers,Education (Bachelor Degree),Education (Some High School),Moms (2+ children)
2
New Moms,Parents,Small Business Decisionmakers,Small Business Employees,Education (High School Diploma),Education (Bachelor Degree),Education (Some College),Household Income ($1,000-$24,999),Household Income ($25,000-$49,999),Household Income ($50,000-$74,999),Life Event (First Time Homebuyer),Life Event (New Homeowner, 12 months),Moms (Single),New Parents,Moms (Working),Spanish Speakers,Education (Some High School),Life Event (Recently Single, 6 months),Occupation (Retired),Presence of Child (Age: 0-3),Presence of Child (Age: 10-12)
1
None
1716
Occupation (Blue Collar)
2
Spanish Speakers
7
targeting_connection_type
None
1734
targeting_carrier_isp
ALL
1734
age_bracket and advanced_demographicsThe age_bracket column’s values are as follows:
| age_bracket | Freq |
|---|---|
| 15+ | 3 |
| 17-24 | 1 |
| 17-27 | 2 |
| 17+ | 1 |
| 18-20 | 1 |
| 18-24 | 19 |
| 18-28 | 1 |
| 18-32 | 1 |
| 18-34 | 837 |
| 18-35 | 6 |
| 18-40 | 3 |
| 18-45 | 36 |
| 18-49 | 16 |
| 18+ | 642 |
| 19+ | 3 |
| 20+ | 33 |
| 21+ | 35 |
| 23+ | 5 |
| 25+ | 7 |
| 30+ | 1 |
| 35+ | 8 |
Clearly, the column’s values overlap and tend to refer to similar age groups, for instance, 18-20, 18-24, and 18+.
As for advanced_demographics:
| advanced_demographics | Freq |
|---|---|
| College Graduates | 1 |
| HHI: High Net Worth,HHI: 100-250k,HHI: 250k+ | 2 |
| Moms | 2 |
| New Moms,Married People,New Parents,Parents,Small Business Employees,Spanish Speakers,Household Income ($1,000-$24,999),Household Income ($25,000-$49,999),Household Income ($50,000-$74,999),Life Event (First Time Homebuyer),Life Event (New Homeowner, 12 months),Presence of Child (Age: 0-3),Presence of Child (Age: 10-12),Occupation (Retired),Moms (Working),Moms (Single),Education (Bachelor Degree),Education (High School Diploma),Education (Some High School),Moms (2+ children) | 1 |
| New Moms,New Parents,Married People,Parents,HHI: <50k,Small Business Decisionmakers,Household Income ($50,000-$74,999),Household Income ($1,000-$24,999),Household Income ($25,000-$49,999),Life Event (First Time Homebuyer),Life Event (New Homeowner, 12 months),Presence of Child (Age: 0-3),Presence of Child (Age: 10-12),Occupation (Office & Administrative),Moms (Working),Occupation (Retired),Moms (Stay at Home),Moms (Single),Spanish Speakers,Education (Bachelor Degree),Education (Some High School),Moms (2+ children) | 2 |
| New Moms,Parents,Small Business Decisionmakers,Small Business Employees,Education (High School Diploma),Education (Bachelor Degree),Education (Some College),Household Income ($1,000-$24,999),Household Income ($25,000-$49,999),Household Income ($50,000-$74,999),Life Event (First Time Homebuyer),Life Event (New Homeowner, 12 months),Moms (Single),New Parents,Moms (Working),Spanish Speakers,Education (Some High School),Life Event (Recently Single, 6 months),Occupation (Retired),Presence of Child (Age: 0-3),Presence of Child (Age: 10-12) | 1 |
| None | 1716 |
| Occupation (Blue Collar) | 2 |
| Spanish Speakers | 7 |
Clearly, very few ads provided additional demographic information for ad targetting and the data aren’t uniform (i.e. there are details on people’s household incomes, occupations, languages spoken, educational levels, number of children etc.), so I wouldn’t be able to effectively analyze it in relation to other columns.
Though I was looking forward to analyzing these columns, the data they had were too sparse to work with.
The “Z” at the end of the date-timestamp indicates that the timezone chosen is UTC, but I won’t be requiring it for analysis, so I’ll remove it. Also, I’m arranging the rows by the start date set for the advertisement and converting the data types of the date columns (start_date and end_date) from character to date-time.
FALSE
1734
# A tibble: 6 × 31
adid creat…¹ curre…² spend impre…³ start…⁴ end_d…⁵ organ…⁶ billi…⁷ candi…⁸
<chr> <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
1 7f09cee… https:… USD 114 7.69e4 2020/0… <NA> Marud … 7050 W… Donald…
2 ef7401b… https:… USD 6360 6.12e6 2020/0… <NA> Marud … 7050 W… Donald…
3 46bc9ef… https:… USD 27 2.75e4 2020/0… <NA> Marud … 7050 W… Donald…
4 5ea3e51… https:… USD 14836 3.18e7 2020/0… <NA> Marud … 7050 W… Donald…
5 66652b8… https:… USD 1636 3.67e6 2020/0… <NA> Marud … 7050 W… Donald…
6 676f4ed… https:… USD 77 1.81e4 2020/0… 2020/0… Biden … 1500 M… Joe Bi…
# … with 21 more variables: paying_advertiser_name <chr>, gender <chr>,
# age_bracket <chr>, country_code <chr>, regions_included <chr>,
# regions_excluded <chr>, electoral_districts_included <chr>,
# radius_targeting_included <chr>, radius_targeting_excluded <chr>,
# metros_included <chr>, metros_excluded <chr>, postal_codes_included <list>,
# postal_codes_excluded <chr>, interests <chr>, os_type <chr>,
# segments <chr>, language <chr>, advanced_demographics <chr>, …
# ℹ Use `colnames()` to see all variable names
[1] "character"
[1] "POSIXct" "POSIXt"
[1] "POSIXct" "POSIXt"
# A tibble: 6 × 31
adid creat…¹ curre…² spend impre…³ start_date end_date
<chr> <chr> <chr> <dbl> <dbl> <dttm> <dttm>
1 7f09cee… https:… USD 114 7.69e4 2020-01-04 20:55:49 NA
2 ef7401b… https:… USD 6360 6.12e6 2020-01-04 20:55:49 NA
3 46bc9ef… https:… USD 27 2.75e4 2020-01-07 00:50:06 NA
4 5ea3e51… https:… USD 14836 3.18e7 2020-01-07 03:09:54 NA
5 66652b8… https:… USD 1636 3.67e6 2020-01-10 02:11:36 NA
6 676f4ed… https:… USD 77 1.81e4 2020-01-10 17:23:38 2020-01-15 17:23:38
# … with 24 more variables: organization_name <chr>, billing_address <chr>,
# candidate_ballot_information <chr>, paying_advertiser_name <chr>,
# gender <chr>, age_bracket <chr>, country_code <chr>,
# regions_included <chr>, regions_excluded <chr>,
# electoral_districts_included <chr>, radius_targeting_included <chr>,
# radius_targeting_excluded <chr>, metros_included <chr>,
# metros_excluded <chr>, postal_codes_included <list>, …
# ℹ Use `colnames()` to see all variable names
Next, I want to create a new column that gives the duration for which the ad was run on Snapchat. I chose to display this information in hours.
[1] NA 120.000000 131.605833 131.399167 168.616667 33.011111
[7] 85.733889 6.654722 173.631667 172.604167 171.250556 149.866667
[13] 148.000000 144.000000 226.211389 226.211111 226.208611 226.206111
[19] 226.205833 175.622778 175.620278 415.280278 415.278333 1860.741667
[25] 323.741667 96.793333 155.999722 167.999722 503.999722 167.983333
[31] 144.999722 335.966667 335.965278 335.960278 335.957500 335.956944
[37] 335.951944 312.950278 128.200000 128.116667 128.016667 127.700000
[43] 126.266667 126.205000 126.118889 126.016667 125.506389 125.239722
[49] 125.164444 301.007500 128.999722 223.441111 168.822222 168.816111
[55] 168.813333 168.809167 168.808889 168.807778 168.805278 168.803611
[61] 168.791111 168.781389 168.775833 544.499722 37.778889 37.712778
[67] 37.624722 37.495556 37.468056 37.441111 37.409444 37.383611
[73] 37.357222 37.319722 37.291667 11.584167 11.549167 11.481944
[79] 11.435556 11.407222 11.379167 11.353611 11.301111 11.274722
[85] 11.251944 11.229444 24.000000 167.996389 167.995278 12.722500
[91] 12.052222 12.021944 11.936944 11.839722 11.805278 11.763611
[97] 11.736111 11.714167 11.648889 11.647222 9.466944 835.854722
[103] 125.184444 623.999722 167.999444 167.998889 167.990556 167.987778
[109] 159.999722 147.350000 129.216111 129.491667 645.401111 612.831667
[115] 589.045000 615.178889 588.330000 511.026667 578.026944 487.057500
[121] 554.057778 463.026667 31.026667 107.214167 505.000000 499.000000
[127] 513.937500 168.000000 48.000000 434.123889 436.123889 348.000000
[133] 352.000000 336.719722 312.908889 319.996111 314.882222 27.999722
[139] 286.466667 298.183333 294.123611 296.123611 227.999722 227.499722
[145] 264.999722 240.975556 238.131667 253.086667 264.054444 36.054167
[151] 228.992222 266.963056 179.962778 198.620556 217.000000 224.000000
[157] 190.991111 127.057500 152.057500 188.500000 188.000000 192.999722
[163] 189.500000 190.000000 187.999167 130.999722 132.000000 125.055556
[169] 125.060833 125.056111 125.061111 125.046111 125.057778 125.059722
[175] 125.057500 122.421389 58.141111 100.152500 61.141111 103.583333
[181] 84.000000 85.000000 86.000000 81.131944 51.165278 53.979444
[187] 28.999722 40.336667
Missing values show up for those rows without an end date for the advertisement.
The following columns indicate differnet types of information about the locations targeted by the advertisements: regions_included, regions_excluded, electoral_districts_included, radius_targeting_included, radius_targeting_excluded, metros_included, metros_excluded, postal_codes_included, postal_codes_excluded. Most of these columns do not have enough values to be effectively analyzed, and due to a lack of time, the list column postal_codes_included could not be included in analysis.
I’ll be using the regions_included and regions_excluded columns for analysis. They have multiple regions in them which need to be separated:
| regions_included | Freq |
|---|---|
| Alabama,Alaska,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,District of Columbia,Florida,Georgia,Hawaii,Idaho,Illinois,Indiana,Iowa,Kansas,Kentucky,Maine,Louisiana,Maryland,Massachusetts,Michigan,Minnesota,Missouri,Montana,Mississippi,Nebraska,Nevada,New Hampshire,New Jersey,North Carolina,New Mexico,North Dakota,Ohio,New York,Oregon,Oklahoma,Pennsylvania,South Carolina,Rhode Island,South Dakota,Tennessee,Texas,Utah,Vermont,Virginia,Washington,West Virginia,Wisconsin,Wyoming | 2 |
| Alabama,Arkansas,Florida,Georgia,Indiana,Idaho,Iowa,Kansas,Kentucky,Louisiana,Wyoming,Virginia,Tennessee,South Carolina,South Dakota,Texas,Nebraska,Montana,New Mexico,Ohio,North Dakota,North Carolina,Arizona | 2 |
| Alabama,Wyoming,Idaho,West Virginia,Louisiana,Tennessee | 1 |
| Arizona | 150 |
| Arizona,Colorado,Florida,Georgia,Iowa,Michigan,Minnesota,North Carolina,New Hampshire,Nevada,Ohio,Pennsylvania,Texas,Virginia,Wisconsin | 8 |
| Arizona,Florida,Georgia,Iowa,North Carolina,Nevada,Ohio,Pennsylvania,Wisconsin | 2 |
| Arizona,Florida,Georgia,North Carolina,Nevada,Ohio,Pennsylvania,Wisconsin | 1 |
| Arizona,Florida,Minnesota,Michigan,Nevada,North Carolina,Pennsylvania,Wisconsin | 4 |
| California,New York | 3 |
| Colorado | 2 |
| Colorado,Florida,Georgia,Michigan,Iowa,Ohio,Pennsylvania,Virginia,Wisconsin | 1 |
| Colorado,Georgia,Florida,Iowa,Ohio,Pennsylvania,Wisconsin | 1 |
| Florida | 156 |
| Florida,Alabama,Mississippi,Louisiana,Texas,South Carolina,North Carolina | 1 |
| Florida,Georgia,Alabama,Mississippi,South Carolina,North Carolina,Texas | 1 |
| Georgia | 29 |
| Idaho,Utah,Arizona,Wyoming,North Dakota,South Dakota,Kansas,Oklahoma,Texas,Iowa,Missouri,Arkansas,Indiana,Tennessee,Mississippi,Ohio,Alabama,West Virginia,South Carolina,Georgia,Florida | 1 |
| Iowa | 27 |
| Iowa,Michigan,Arizona,Florida,Georgia,Maine,Nebraska,Minnesota,North Carolina,Ohio,Pennsylvania,Wisconsin,Nevada | 1 |
| Maine | 8 |
| Michigan | 138 |
| Minnesota | 87 |
| Nebraska | 6 |
| Nevada | 64 |
| New Hampshire | 2 |
| North Carolina | 116 |
| Ohio | 24 |
| Pennsylvania | 123 |
| Pennsylvania,Wisconsin,New Hampshire,North Carolina,Nevada | 1 |
| Texas,Florida,Georgia,Tennessee,California,New York | 1 |
| Virginia | 2 |
| Wisconsin | 111 |
[1] NA "Alabama" "Arkansas"
[4] "Florida" "Georgia" "Indiana"
[7] "Idaho" "Iowa" "Kansas"
[10] "Kentucky" "Louisiana" "Wyoming"
[13] "Virginia" "Tennessee" "South Carolina"
[16] "South Dakota" "Texas" "Nebraska"
[19] "Montana" "New Mexico" "Ohio"
[22] "North Dakota" "North Carolina" "Arizona"
[25] "California" "New York" "West Virginia"
[28] "Utah" "Oklahoma" "Missouri"
[31] "Mississippi" "Pennsylvania" "Wisconsin"
[34] "New Hampshire" "Nevada" "Alaska"
[37] "Colorado" "Connecticut" "Delaware"
[40] "District of Columbia" "Hawaii" "Illinois"
[43] "Maine" "Maryland" "Massachusetts"
[46] "Michigan" "Minnesota" "New Jersey"
[49] "Oregon" "Rhode Island" "Vermont"
[52] "Washington"
| regions_excluded | Freq |
|---|---|
| Alaska | 66 |
| Alaska,California,Hawaii | 7 |
| Hawaii,Alaska,California | 7 |
[1] "Alaska" NA "Hawaii" "California"
The states of Alaska, Hawaii, and California were excluded from being shown certain political advertisements of the candidates.
[california political advertisement disclosure law]
Checking whether information on organization_name and paying_advertiser_name is available for those advertisements excluding these regions:
# A tibble: 72 × 5
# Groups: organization_name [1]
organization_name paying_advertiser_name spend candidate_ballot_inf…¹ regio…²
<chr> <chr> <dbl> <chr> <chr>
1 Marud Khan Albbiom Marketing LLC 114 Donald Trump Alaska
2 Marud Khan Albbiom Marketing LLC 6360 Donald Trump Alaska
3 Marud Khan Albbiom Marketing LLC 27 Donald Trump Alaska
4 Marud Khan Albbiom Marketing LLC 14836 Donald Trump Alaska
5 Marud Khan Albbiom Marketing LLC 1636 Donald Trump Alaska
6 Marud Khan Albbiom Marketing LLC 3120 Donal Trump Alaska
7 Marud Khan Albbiom Marketing LLC 102 Donald Trump Alaska
8 Marud Khan Albbiom Marketing LLC 235 Donald Trump Alaska
9 Marud Khan Albbiom Marketing LLC 87 Donald Trump Alaska
10 Marud Khan Albbiom Marketing LLC 95 Donald Trump Alaska
# … with 62 more rows, and abbreviated variable names
# ¹candidate_ballot_information, ²regions_excluded
# ℹ Use `print(n = ...)` to see more rows
Interestingly, all of the ads that excluded these regions supported Donald Trump as a candidate, were by an organization called Marud Khan, and were paid for by Albbiom Marketing LLC. According to Markay (2020), Albbiom Marketing LLC is a marketing company that provides “free” Trump merchandise. They also found no evidence that ‘Marud Khan’ was a real person.
Lastly, I’ll be changing the entries candidate_ballot_information to either “Biden” or “Trump” so that it’s more uniform for ease of analysis. For instance, “Joe Biden for President” will be changed to “Biden”.
# changing `candidate_ballot_information` to either "Biden" or "Trump"
polads <- polads %>%
mutate(candidate_ballot_information = case_when(
str_detect(candidate_ballot_information, "Biden") ~ "Biden",
str_detect(candidate_ballot_information, "Trump") ~ "Trump",
TRUE ~ candidate_ballot_information))
# sanity check
polads %>%
filter(str_detect(candidate_ballot_information, "Trump")) %>%
tally() %>%
knitr::kable(col.names = "Number of Trump ads")| Number of Trump ads |
|---|
| 734 |
| Number of Biden ads |
|---|
| 1410 |
There are 1410 political advertisements supporting Biden’s campaign and 734 political advertisements for Trump’s campaign.
# A tibble: 2 × 32
# Groups: candidate_ballot_information [2]
adid creat…¹ curre…² spend impre…³ start_date end_date
<chr> <chr> <chr> <dbl> <dbl> <dttm> <dttm>
1 fd0d0b… https:… USD 151724 6.08e6 2020-11-03 05:00:00 2020-11-04 09:59:59
2 9cc7b1… https:… USD 33349 3.04e7 2020-02-19 04:14:48 NA
# … with 25 more variables: organization_name <chr>, billing_address <chr>,
# candidate_ballot_information <chr>, paying_advertiser_name <chr>,
# gender <chr>, age_bracket <chr>, country_code <chr>,
# regions_included <chr>, regions_excluded <chr>,
# electoral_districts_included <chr>, radius_targeting_included <chr>,
# radius_targeting_excluded <chr>, metros_included <chr>,
# metros_excluded <chr>, postal_codes_included <list>, …
# ℹ Use `colnames()` to see all variable names
The highest funds allocated for a single political advertisement supporting Biden (and overall) was $151724, while the $33349 spent by Albbiom Marketing LLC was the most expensive political advertisement for Trump’s campaign. The Biden advertisment was displayed almost all day on election day (11/03/2020) as indicated by its start and end date. Even though more was spent on the Biden advertisement, Trump’s advertisement had more impressions (30383613).
I’m interested in knowing the relative expenditure on advertisements for both candidates. First, I want to extract the month from the start_date and end_date columns and use it to determine spending over the months. I’ll need to take a log transformation because the values in the spend column are skewed. I’m using a boxplot since I want to compare the distribution of spend for the two values in candidate_ballot_information.
Ord.factor w/ 12 levels "Jan"<"Feb"<"Mar"<..: 1 1 1 1 1 1 1 1 1 1 ...
Ord.factor w/ 12 levels "Jan"<"Feb"<"Mar"<..: NA NA NA NA NA 1 1 1 NA NA ...
exp_by_month_plot <- ggplot(polads, aes(log(spend), start_month, color= candidate_ballot_information)) + geom_boxplot() + scale_color_brewer(palette = "Set2") + labs(title = "Snapchat Political Ad Expenditure By Month (2020)", x = "Expenditure", y = "Month", colour = "Candidate") + theme_minimal()
exp_by_month_plotWarning: Removed 8 rows containing non-finite values (stat_boxplot).

On average, ads for Biden spent more that ads for Trump. Also, political ads supporting Biden’s campaign were more frequent in the months leading up to election day, i.e. August to November.
imp_by_month_plot <- ggplot(polads, aes(log(impressions), start_month, color= candidate_ballot_information)) + geom_boxplot() + scale_color_brewer(palette = "Set2") + labs(title = "Snapchat Political Ad Impressions By Month (2020)", x = "Impressions", y = "Month", colour = "Candidate") + theme_minimal()
imp_by_month_plot
I also want to determine whether there’s a correlation between spend and impressions.
Correlation computed with
• Method: 'pearson'
• Missing treated using: 'pairwise.complete.obs'

This plot shows us that there’s a moderate correlation between these two variables.
regions_included - chloropleth - states targeted = grouped by candidate
Note: missing values - x% were targeted to all states
impressions sum - per org
spend sum - per org
spend and impressions - scatterplot/line graph - grouped by candidate, org
Snap Audience Match or Customer List Audience is a Snapchat feature that allows users to send their data to the platform and its affiliates to form custom audiences (“Snapchat Audience Match Terms”, n.d.).↩︎
A Lookalike audience reaches Snapchat users that have similar characteristics to an organization account’s existing customers. There are three different options: Similarity (a small-size audience that closely resembles the seed audience), Balance (a medium-size audience that balances similarity and reach), and Reach (a large-size audience that broadly resembles the seed audience) (“Lookalike Audiences”, n.d.).↩︎
---
title: "Final Project (Work-in-Progress)"
author: "Ananya Pujary"
description: "Analyzing Snapchat Political Ad Targeting and Expenditure in the US in 2020"
date: "09/03/2022"
format:
html:
toc: true
code-fold: true
code-copy: true
code-tools: true
categories:
- final-project
- snapchat-political-ads
- tidyverse
- ggplot
- googlesheets4
- skimr
- dplyr
- stringr
- lubridate
- janitor
- purrr
---
:::{.callout-warning}
to do: if-else for package installing, in text citations
:::
```{r}
#| label: setup
#| warning: false
library(tidyverse)
library(googlesheets4)
library(skimr)
library(dplyr)
library(stringr)
library(lubridate)
library(janitor)
library(purrr)
library(corrr)
knitr::opts_chunk$set(echo = TRUE)
```
## Introduction
- Snapchat has made data about the political ads shown on their app public
- focus on advertisements in the United States in 2020 for Biden and Trump
- looking at ad expenditure, impressions, location targeting
## Reading in the Data
```{r}
#| label: reading in the data
polads_orig <- read_sheet('https://docs.google.com/spreadsheets/d/1S7jF0D2o8aC3gGndORVrksuSsvMMZwqVdKLmu4SYqUc/edit?usp=sharing')
```
```{r}
#| label: describing the data (1)
dim(polads_orig)
skim(polads_orig)
print(summarytools::dfSummary(polads_orig, varnumbers = FALSE, plain.ascii = FALSE, graph.magnif = 0.50, style = "grid", valid.col = FALSE),
method = 'render', table.classes = 'table-condensed')
```
This file contains the information for political ads that are/have been displayed on Snapchat's platform. It has 12705 rows and 38 columns. There are 28 character-type, 1 list-type, 7 logical-type, and 2 numeric-type columns. the variables are:
1) `ADID`: A unique value for each political advertisement.
2) `CreativeURL`: A URL to the advertisement's creative content.
3) `Currency Code`: The currency used by the account creating the advertisement.
4) `Spend`: The amount spent by the advertiser for the ad campaign expressed in local currency.
5) `Impressions`: The number of times the advertisement has been viewed by Snapchat users.
6) `StartDate`: The time at which the advertisement was set to start running on the platform.
7) `EndDate`: The time at which the advertisement was set to stop running on the platform.
8) `OrganizationName`: The organization that is responsible for creating the advertisement.
9) `BillingAddress`: The address of the organization that is responsible for creating the advertisement.
10) `CandidateBallotInformation`: Information on the candidate (for California elections: also the office they are contesting for) or ballot initiative that the advertisement is associated with the advertisement.
11) `PayingAdvertiserName`: The entity that is providing funds for the advertisement.
12) `CommitteeName`: The name of the committee paying for the advertisement.
13) `CommitteeIdentificationNumber`: The identification number of the committee paying for the advertisement.
14) `DisclosureNameOfCommittee`: The disclosure name of the committee paying for the advertisement, as stipulated by California law.
15) `AdvertisingJurisdiction`: The jurisdiction that the advertisement refers to.
16) `Gender`: The genders targeted by the advertisement. If this field is empty, all genders were targeted.
17) `AgeBracket`: The ages targeted by the advertisement. If this field is empty, all ages were targeted.
18) `CountryCode`: The country that the advertisement is targeting.
19) `Regions (Included)`: The region(s) included in the advertisement's targeting criteria (states or provinces).
20) `Regions (Excluded)`: The region(s) excluded in the advertisement's targeting criteria (states or provinces).
21) `Electoral Districts (Included)`: The electoral district(s) included in the advertisement's targeting criteria.
22) `Electoral Districts (Excluded)`: The electoral district(s) excluded in the advertisement's targeting criteria.
23) `Radius Targeting (Included)`: The point-radius circles included in the advertisement's targeting criteria.
24) `Radius Targeting (Excluded)`: The point-radius circles excluded in the advertisement's targeting criteria.
25) `Metros (Included)`: The metro(s) included in the advertisement's targeting criteria.
26) `Metros (Excluded)`: The metro(s) excluded in the advertisement's targeting criteria.
27) `Postal Code (Included)`: The postal code(s) included in the advertisement's targeting criteria.
28) `Postal Code (Excluded)`: The postal code(s) excluded in the advertisement's targeting criteria.
29) `Location Categories (Included)`: The location categories included in the advertisement's targeting criteria.
30) `Location Categories (Excluded)`: The location categories excluded in the advertisement's targeting criteria.
31) `Interests`: The interest audience(s) included in the advertisement's targeting criteria. If this field is empty, then no interest targeting was used.
32) `OsType`: The operating systems included in the advertisement's targeting criteria. If this field is empty, then all operating systems were targeted.
33) `Segments`: The segments included in the advertisement's targeting criteria. This is advertiser-specific data used such as Snap Audience Match[^1] or Lookalike audiences[^2] .
34) `Language`: The languages targeted by the advertisement. If this field is empty, then no language-based targeting was used.
35) `AdvancedDemographics`: The third-party data segments targeted by the advertisement. If this field is empty, then no third-party data segments were used.
[^1]: Snap Audience Match or Customer List Audience is a Snapchat feature that allows users to send their data to the platform and its affiliates to form custom audiences ("Snapchat Audience Match Terms", n.d.).
[^2]: A Lookalike audience reaches Snapchat users that have similar characteristics to an organization account's existing customers. There are three different options: Similarity (a small-size audience that closely resembles the seed audience), Balance (a medium-size audience that balances similarity and reach), and Reach (a large-size audience that broadly resembles the seed audience) ("Lookalike Audiences", n.d.).
<!-- -->
36) `Targeting Connection Type`: The internet connection type targeted by the advertisement. If this field is empty, then no targeting based on internet connect type was used.
37) `Targeting Carrier (ISP)`: The carrier type targeted by the advertisement. If this field is empty, all carrier types are targeted.
38) `CreativeProperties`: The URL specified in advertisement's call to action.
:::{.callout-warning}
issue: all columns not showing up in plot
:::
```{r}
missing.values <- polads_orig %>%
gather(key = "key", value = "val") %>%
mutate(isna = is.na(val)) %>%
group_by(key) %>%
mutate(total = n()) %>%
group_by(key, total, isna) %>%
summarise(num.isna = n()) %>%
mutate(percents = num.isna / total * 100)
levels <-
(missing.values %>% filter(isna == T) %>% arrange(desc(percents)))$key
missing_val_plot <- missing.values %>%
ggplot() +
geom_bar(aes(x = reorder(key, desc(percents)),
y = percents, fill=isna),
stat = 'identity', alpha=0.8) +
scale_x_discrete(limits = levels) +
scale_fill_manual(name = "",
values = c('pink', 'grey'), labels = c("Present", "Missing")) +
coord_flip() + labs(title = "Percentage of missing values", x =
'Column', y = "Missing values %")
missing_val_plot
```
Now, let's look at the distribution of countries receiving political advertisements on Snapchat.
:::{.callout-warning}
arrange in descending
:::
```{r}
#| label: describing the data (2)
table(polads_orig$CountryCode) %>%
knitr::kable(caption = "Countries Receiving Political Ads on Snapchat (2020)",col.names = c("Country","Frequency"))
```
The highest number of political advertisements were delivered to places in the United States (11124).
## Tidying the Data
Snake case is typically recommended by tidyverse's style guide for column names and object names. However the column names in this dataset are written either in title case (e.g. `Currency Code`) or camel case (e.g. `OrganizationName`). Some of them also contain special characters like brackets which could interfere with implementing R functions.
::: callout-note
Snake case refers to the writing style that replaces spaces between words with an underscore (\_) and all of the letters in a word are lowercase. On the other hand, title case is the writing style in which the first letter of each word is capitalized and there are spaces between each word. A third type is the camel case, wherein phrases are written out without punctuation or spaces, and words are usually distinguished with the second word's first letter capitalized.
:::
Hence, using the `clean_names()` function from the 'janitor' package to convert all the column names accordingly.
```{r}
#| label: tidying the data (1)
polads <-clean_names(polads_orig)
colnames(polads)
```
Since these columns only have missing values, they can be excluded from analysis: `committee_name`, `committee_identification_number`, `disclosure_name_of_committee`, `advertising_jurisdiction`, `electoral_districts_excluded`, `location_categories_included`, `location_categories_excluded`.
```{r}
#| label: tidying the data (2)
polads <- polads %>%
remove_empty()
```
### Narrowing down the data
Only keeping rows that describe ads targeting the United States:
```{r}
#| label: tidying the data (3)
polads <- filter(polads,country_code =="united states")
polads
```
Verifying whether all ads targeted for the United States were paid for in USD.
```{r}
#| label: tidying the data (4)
table(select(polads,currency_code))
```
Three ads were paid for in Canadian Dollars (CAD). Finding out more about these three rows:
```{r}
#| label: tidying the data (5)
polads %>%
filter(currency_code=="CAD")
```
Two ads were paid for by the University of British Columbia and were targeted at people aged 16-25 in the following areas: San Francisco, Oakland, and San Jose. The third was paid for by Point Digital Creative Studio. None of them provided information about the candidate associated with the ad.
Since we require information about the candidate in order to analyze relative ad spending, targetting and impressions, tidying up the `candidate_ballot_information` column by removing missing values:
```{r}
#| label: tidying the data (6)
sum(is.na(polads$candidate_ballot_information))
# removing rows with missing values
polads <- drop_na(polads,candidate_ballot_information)
polads
```
There were 5312 rows missing candidate information. Next, I'm only including those rows that explicitly states the candidate name (containing the words 'Biden' and 'Trump').
```{r}
#| label: tidying the data (7)
table(select(polads,candidate_ballot_information))
polads <- filter(polads, str_detect(candidate_ballot_information, 'Biden|Trump'))
# sanity check
table(select(polads,candidate_ballot_information)) %>%
knitr::kable()
```
There are two entries that contain the string "Trump" but are in fact campaigning against him ("Against Trump", "Operation Dump Trump", "Titere de Trump"). There's also an entry called "Biden vs Trump" which doesn't clearly indicate which party the ad will be supporting. Removing these rows so that they don't skew the results:
```{r}
#| label: tidying the data (8)
polads <- polads %>%
filter(!(candidate_ballot_information=="Against Trump"| candidate_ballot_information=="Operation Dump Trump"| candidate_ballot_information=="Biden vs Trump"| candidate_ballot_information=="Titere de Trump"))
```
(aside: 7 ads for Kanye West!)
Since missing values in certain columns indicate that either all or none of the categories in the column were targeted, I'm changing their missing values accordingly for easy analysis.
```{r}
#| label: tidying the data (9)
table(select(polads,gender))
table(select(polads,os_type))
table(select(polads,language))
table(select(polads,advanced_demographics))
table(select(polads,targeting_connection_type))
table(select(polads,targeting_carrier_isp))
polads <- polads %>%
replace_na(list(gender = "ALL",os_type = "ALL",language = "none",advanced_demographics = "None",targeting_connection_type = "None",targeting_carrier_isp = "ALL"))
# sanity check
table(select(polads,gender))
table(select(polads,os_type))
table(select(polads,language))
table(select(polads,advanced_demographics))
table(select(polads,targeting_connection_type))
table(select(polads,targeting_carrier_isp))
```
### The case of `age_bracket` and `advanced_demographics`
The `age_bracket` column's values are as follows:
```{r}
#| label: tidying the data (10)
table(select(polads,age_bracket)) %>%
knitr::kable()
```
Clearly, the column's values overlap and tend to refer to similar age groups, for instance, 18-20, 18-24, and 18+.
As for `advanced_demographics`:
```{r}
#| label: tidying the data (11)
table(select(polads,advanced_demographics))%>%
knitr::kable()
```
Clearly, very few ads provided additional demographic information for ad targetting and the data aren't uniform (i.e. there are details on people's household incomes, occupations, languages spoken, educational levels, number of children etc.), so I wouldn't be able to effectively analyze it in relation to other columns.
Though I was looking forward to analyzing these columns, the data they had were too sparse to work with.
### Wrangling with the date columns
The "Z" at the end of the date-timestamp indicates that the timezone chosen is UTC, but I won't be requiring it for analysis, so I'll remove it. Also, I'm arranging the rows by the start date set for the advertisement and converting the data types of the date columns (`start_date` and `end_date`) from character to date-time.
```{r}
#| label: tidying the data (12)
#checking for missing values
table(is.na(polads$start_date))
polads <- polads %>%
arrange(ymd_hms(polads$start_date))
#sanity check
head(polads)
class(polads$start_date)
# converting data types of date columns from string to datetime
polads <- polads %>%
mutate(start_date = ymd_hms(start_date)) %>%
mutate(end_date = ymd_hms(end_date))
# rechecking class of these columns
class(polads$start_date)
class(polads$end_date)
head(polads)
```
Next, I want to create a new column that gives the duration for which the ad was run on Snapchat. I chose to display this information in hours.
```{r}
#| label: tidying the data (13)
polads <- polads %>%
mutate(ad_duration = difftime(end_date,start_date,units= c("hours")))
unique(polads$ad_duration)
```
Missing values show up for those rows without an end date for the advertisement.
### Wrangling with the location columns
The following columns indicate differnet types of information about the locations targeted by the advertisements: `regions_included`, `regions_excluded`, `electoral_districts_included`, `radius_targeting_included`, `radius_targeting_excluded`, `metros_included`, `metros_excluded`, `postal_codes_included`, `postal_codes_excluded`. Most of these columns do not have enough values to be effectively analyzed, and due to a lack of time, the list column `postal_codes_included` could not be included in analysis.
I'll be using the `regions_included` and `regions_excluded` columns for analysis. They have multiple regions in them which need to be separated:
```{r}
#| label: tidying the data (14)
# `regions_included`
table(select(polads,regions_included)) %>%
knitr::kable()
polads <- polads %>%
separate_rows(regions_included, sep = ",")
# sanity check
unique(polads$regions_included)
# `regions_excluded`
table(select(polads,regions_excluded)) %>%
knitr::kable()
polads <- polads %>%
separate_rows(regions_excluded, sep = ",")
# sanity check
unique(polads$regions_excluded)
```
The states of Alaska, Hawaii, and California were excluded from being shown certain political advertisements of the candidates.
\[california political advertisement disclosure law\]
Checking whether information on `organization_name` and `paying_advertiser_name` is available for those advertisements excluding these regions:
```{r}
#| label: tidying the data (15)
polads %>%
select(organization_name,paying_advertiser_name,spend,candidate_ballot_information,regions_excluded) %>%
group_by(organization_name) %>%
filter(str_detect(regions_excluded, 'California|Hawaii|Alaska')) %>%
distinct()
```
Interestingly, all of the ads that excluded these regions supported Donald Trump as a candidate, were by an organization called Marud Khan, and were paid for by Albbiom Marketing LLC. According to Markay (2020), Albbiom Marketing LLC is a marketing company that provides "free" Trump merchandise. They also found no evidence that 'Marud Khan' was a real person.
Lastly, I'll be changing the entries `candidate_ballot_information` to either "Biden" or "Trump" so that it's more uniform for ease of analysis. For instance, "Joe Biden for President" will be changed to "Biden".
```{r}
#| label: tidying the data (16)
# changing `candidate_ballot_information` to either "Biden" or "Trump"
polads <- polads %>%
mutate(candidate_ballot_information = case_when(
str_detect(candidate_ballot_information, "Biden") ~ "Biden",
str_detect(candidate_ballot_information, "Trump") ~ "Trump",
TRUE ~ candidate_ballot_information))
# sanity check
polads %>%
filter(str_detect(candidate_ballot_information, "Trump")) %>%
tally() %>%
knitr::kable(col.names = "Number of Trump ads")
polads %>%
filter(str_detect(candidate_ballot_information, "Biden")) %>%
tally() %>%
knitr::kable(col.names = "Number of Biden ads")
```
There are 1410 political advertisements supporting Biden's campaign and 734 political advertisements for Trump's campaign.
## Data Analysis and Visualization
### Highest expenditure on a single ad by candidate
```{r}
#| label: highest expenditure on a single ad by candidate
polads %>%
group_by(candidate_ballot_information) %>%
slice(which.max(spend))
```
The highest funds allocated for a single political advertisement supporting Biden (and overall) was \$151724, while the \$33349 spent by Albbiom Marketing LLC was the most expensive political advertisement for Trump's campaign. The Biden advertisment was displayed almost all day on election day (11/03/2020) as indicated by its start and end date. Even though more was spent on the Biden advertisement, Trump's advertisement had more impressions (30383613).
### Relative ad expenditure and impressions over time by candidate
I'm interested in knowing the relative expenditure on advertisements for both candidates. First, I want to extract the month from the `start_date` and `end_date` columns and use it to determine spending over the months. I'll need to take a log transformation because the values in the `spend` column are skewed. I'm using a boxplot since I want to compare the distribution of `spend` for the two values in `candidate_ballot_information`.
```{r}
#| label: political ad expenditure by month
polads <- polads %>%
mutate(start_month = month(start_date,label = TRUE),end_month = month(end_date, label = TRUE))
#sanity check
str(polads$start_month)
str(polads$end_month)
exp_by_month_plot <- ggplot(polads, aes(log(spend), start_month, color= candidate_ballot_information)) + geom_boxplot() + scale_color_brewer(palette = "Set2") + labs(title = "Snapchat Political Ad Expenditure By Month (2020)", x = "Expenditure", y = "Month", colour = "Candidate") + theme_minimal()
exp_by_month_plot
```
On average, ads for Biden spent more that ads for Trump. Also, political ads supporting Biden's campaign were more frequent in the months leading up to election day, i.e. August to November.
- relative impressions over time for both campaigns
```{r}
#| label: political ad impressions by month
imp_by_month_plot <- ggplot(polads, aes(log(impressions), start_month, color= candidate_ballot_information)) + geom_boxplot() + scale_color_brewer(palette = "Set2") + labs(title = "Snapchat Political Ad Impressions By Month (2020)", x = "Impressions", y = "Month", colour = "Candidate") + theme_minimal()
imp_by_month_plot
```
I also want to determine whether there's a correlation between `spend` and `impressions`.
```{r}
polads_cor <- polads %>%
select(spend,impressions) %>%
correlate()
polads_cor_plot <- rplot(polads_cor) + labs(title = "Correlation between Ad Expenditure and Impressions Received\n")
polads_cor_plot
```
This plot shows us that there's a moderate correlation between these two variables.
### Location targeting by candidate
regions_included - chloropleth
- states targeted = grouped by candidate
Note: missing values - x% were targeted to all states
- impressions sum - per org
- spend sum - per org
- spend and impressions - scatterplot/line graph - grouped by candidate, org
## Reflections
- the potential of political advertisements on social media - more impressions, and thus, more impact
- The US has made most use of the Snapchat platform for political ads compared to other countries.
- Wasn't able to use advanced_demographics because of sparse data and age_bracket because of overlapping categories - would've provided deeper insight into which demographics the candidates and their supporters were interested in
## Further Directions and Conclusion
- Using the postal codes and latitude-longitude columns to map more specific regions
## References
::: {#refs}
:::